﻿Module Module1

    Sub Main()
        'Dim machA As MachDien
        'machA = New MachNoiTiep(1, 2, 3, 4, 5, 6)
        'Dim tongTroA As Double
        'tongTroA = machA.TongTro()
        'Console.WriteLine("Tong tro A:{0}", tongTroA)

        'Dim machB As MachDien
        'machB = New MachNoiTiep(New MachDon(1), New MachDon(4))
        'Dim tongTroB As Double
        'tongTroB = machB.TongTro()
        'Console.WriteLine("Tong tro B:{0}", tongTroB)

        Dim m1 As MachDien
        Dim m23 As MachDien
        Dim m45 As MachDien
        Dim m6 As MachDien

        m1 = New MachDon(1)
        m23 = New MachSongSong(2, 3)
        m45 = New MachSongSong(4, 5)
        m6 = New MachDon(6)

        Dim machTong As MachDien
        machTong = New MachNoiTiep(m1, m23, m45, m6)
        Dim tongTro As Double
        tongTro = machTong.TongTro()
        Console.WriteLine("Tong tro :{0}", tongTro)

        Console.ReadLine()
    End Sub

End Module
